<van-popup 
	v-model:show="InformationPopup" 
	class="detail-popup-message"
	:class="showdata[showdataindex] && !showdata[showdataindex].data.footer?'noPadding':''"
	position="right" 
	:overlay="false" 
	get-container="#DetailPopup">
	<van-nav-bar class="header-top" title="{lang deafil_info}" left-arrow @click-left="InformationPopup=false"></van-nav-bar>
	<div style="position: relative;height: 100%;background: var(--bg-content);padding-top: 46px;" v-cloak>
		
		<div class="DetailPopup-content" style="padding: 0 16px;">
<!-- 			<template v-if="ParamDetail.messageloading">
				<van-loading class="custom-load" size="24px" type="spinner" color="var(--header-text)" vertical>加载中...</van-loading>
			</template>
			<template v-else> -->
				<div class="name">
					<template v-if="parseInt(showdata[showdataindex].data.level)==1">
						<van-image
							 style="width: 25px; height: 25px;vertical-align: bottom;"
							fit="contain"
							src="dzz/pichome/image/grade/1.png"
						/>
					</template>
					<template v-else-if="parseInt(showdata[showdataindex].data.level)==2">
						<van-image
							 style="width: 25px; height: 25px;vertical-align: bottom;"
							fit="contain"
							src="dzz/pichome/image/grade/2.png"
						/>
					</template>
					<template v-else-if="parseInt(showdata[showdataindex].data.level)==3">
						<van-image
							 style="width: 25px; height: 25px;vertical-align: bottom;"
							fit="contain"
							src="dzz/pichome/image/grade/3.png"
						/>
					</template>
					<template v-else-if="parseInt(showdata[showdataindex].data.level)==4">
						<van-image
							 style="width: 25px; height: 25px;vertical-align: bottom;"
							fit="contain"
							src="dzz/pichome/image/grade/4.png"
						/>
					</template>
					<template v-else-if="parseInt(showdata[showdataindex].data.level)==5">
						<van-image
							 style="width: 25px; height: 25px;vertical-align: bottom;"
							fit="contain"
							src="dzz/pichome/image/grade/5.png"
						/>
					</template>
					{{showdata[showdataindex].data.name}}.{{showdata[showdataindex].data.ext}}
				</div>
				<div class="block" v-if="showdata[showdataindex].data.colors && showdata[showdataindex].data.colors.length">
					<div class="title">{lang color}</div>
					<div class="block-item colors">
						<div class="colors" v-for="item in showdata[showdataindex].data.colors" @click="MessageSearch('color',item)">
							<div :style="{background: '#'+item}"></div>
						</div>
					</div>
				</div>
				<div class="block" v-if="showdata[showdataindex].data.tag && showdata[showdataindex].data.tag.length">
					<div class="title">{lang label}</div>
					<div class="block-item tag">
						<div class="tag" v-for="item in showdata[showdataindex].data.tag" @click="MessageSearch('tag',item.key)">{{item.val}}</div>
					</div>
				</div>
				<div class="block" v-if="showdata[showdataindex].data.link">
					<div class="title">{lang link}</div>
					<div class="block-item link">
						<span @click="MessageSearch('link',showdata[showdataindex].data.link)">{{showdata[showdataindex].data.link}}</span>
						<i class="ri-file-copy-line" @click="MessageSearch('copy',showdata[path].data.link)"></i>
					</div>
				</div>
				<div class="block" v-if="showdata[showdataindex].data.realfianllypath">
					<div class="title">{lang fix_address}</div>
					<div class="block-item link">
						<span @click="MessageSearch('link',showdata[showdataindex].data.realfianllypath)">{{showdata[showdataindex].data.realfianllypath}}</span>
						<i class="ri-file-copy-line" @click="MessageSearch('copy',showdata[showdataindex].data.realfianllypath)"></i>
					</div>
				</div>
				<div class="block" v-if="showdata[showdataindex].data.foldernames && showdata[showdataindex].data.foldernames.length">
					<div class="title">{lang classify}</div>
					<div class="block-item tag">
						<div class="tag" v-for="item in showdata[showdataindex].data.foldernames" @click="MessageSearch('classify',item.key)">{{item.val.fname}}</div>
					</div>
				</div>
				<div class="block">
					<div class="title">{lang basic_message}</div>
					<div class="block-item">
						<van-row class="basic">
							<van-col span="12">
								<div class="label">{lang grade}</div>
							</van-col>
							<van-col span="12">
								<div class="record">
									<van-icon v-for="item in showdata[showdataindex].data.grade" name="star" class="star active"></van-icon><van-icon v-for="item in showdata[showdataindex].data.fgrade" name="star" class="star"></van-icon>
								</div>
							</van-col>
						</van-row>
						<van-row class="basic">
							<van-col span="12">
								<div class="label">{lang size}</div>
							</van-col>
							<van-col span="12">
								<div class="record">{{showdata[showdataindex].data.width}}×{{showdata[showdataindex].data.height}}</div>
							</van-col>
						</van-row>
						<van-row class="basic">
							<van-col span="12">
								<div class="label">{lang file_size}</div>
							</van-col>
							<van-col span="12">
								<div class="record">{{showdata[showdataindex].data.fsize}}</div>
							</van-col>
						</van-row>
						<van-row class="basic">
							<van-col span="12">
								<div class="label">{lang type}</div>
							</van-col>
							<van-col span="12">
								<div class="record">{{showdata[showdataindex].data.ext}}</div>
							</van-col>
						</van-row>
						<van-row class="basic">
							<van-col span="12">
								<div class="label">{lang creation_time}</div>
							</van-col>
							<van-col span="12">
								<div class="record">{{showdata[showdataindex].data.mtime}}</div>
							</van-col>
						</van-row>
						<van-row class="basic">
							<van-col span="12">
								<div class="label">{lang add_time}</div>
							</van-col>
							<van-col span="12">
								<div class="record">{{showdata[showdataindex].data.btime}}</div>
							</van-col>
						</van-row>
						<van-row class="basic">
							<van-col span="12">
								<div class="label">{lang modify_time}</div>
							</van-col>
							<van-col span="12">
								<div class="record">{{showdata[showdataindex].data.dateline}}</div>
							</van-col>
						</van-row>
					</div>
				</div>
			<!-- </template> -->
		</div>
		
	</div>
</van-popup>
<script type="text/javascript">
	var MessageMixin = {
		methods:{
			MessageSearch(type,val){
				var self = this;
				var item = self.showdata[self.showdataindex].data;
				switch(type){
					case 'color':
						if(!self.DocumentHref)return false;
						window.parent.location.href = self.DocumentHref + '&color=#' + val;
						window.parent.location.reload();
					break;
					case 'tag':
						if(!self.DocumentHref)return false;
						window.parent.location.href = self.DocumentHref + '&tag=' + val;
						window.parent.location.reload();
					break;
					case 'link':
						window.open(val);
					break;
					case 'classify':
						if(!self.DocumentHref)return false;
						let fidname = sessionStorage.getItem('fidname');
						if(!fidname){
							fidname = 'fid';
						}
						window.parent.location.href = self.DocumentHref+ '&'+fidname+'=' + val;
						window.parent.location.reload();
					break;
					case 'copy':
						self.CommonCopyTxt(val);
					break;
				}
				
			},
		}
	};
</script>